//
//  GuanYuWoMen.m
//  SeeTheWorld
//
//  Created by dllo on 16/2/24.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "GuanYuWoMen.h"
#import "PCH.pch"
#import <UIImageView+WebCache.h>


@interface GuanYuWoMen ()

@property (nonatomic, retain)UIButton *buttonOfLeft;

@end

@implementation GuanYuWoMen

- (void)dealloc {
    [_buttonOfLeft release];
    [super dealloc];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.navigationItem.title = @"关于我们";
    self.navigationController.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:19], NSFontAttributeName, [UIColor whiteColor], NSForegroundColorAttributeName,nil];
    self.navigationController.navigationBar.dk_barTintColorPicker = DKColorWithColors([UIColor colorWithRed:43 / 256.f green:115 / 256.f blue:217 / 256.f alpha:1], [UIColor colorWithRed:39 / 256.f green:39 / 256.f blue:39 / 256.f alpha:1]);

    self.buttonOfLeft = [UIButton buttonWithType:UIButtonTypeCustom];
    self.buttonOfLeft.frame = CGRectMake(5, 10, 30, 30);
    [self.buttonOfLeft addTarget:self action:@selector(fanHui:) forControlEvents:UIControlEventTouchUpInside];
    [self.buttonOfLeft setBackgroundImage:[UIImage imageNamed:@"iconfont-fanhui-2"] forState:UIControlStateNormal];
    UIBarButtonItem *bar = [[UIBarButtonItem alloc] initWithCustomView:self.buttonOfLeft];
    self.navigationItem.leftBarButtonItem = bar;
    [bar release];
    
    UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"LanSe"]];
    imageView.frame = self.view.frame;
    [self.view addSubview:imageView];
    [imageView release];
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 74, self.view.frame.size.width - 20, 100)];
    [self.view addSubview:label];
    [label release];
    label.text = @"「See The World」是一款关于旅行的APP. 收录了世界上著名的旅游景点攻略, 是一款你值得拥有的软件.";
    label.numberOfLines = 0;
    label.font = [UIFont systemFontOfSize:20];
    label.dk_textColorPicker = DKColorWithRGB(0x343434, 0xffffff);

    if ([[NSUserDefaults standardUserDefaults] boolForKey:@"夜间模式"]) {
        UIView *yeJianMoShi = [[UIView alloc] init];
        yeJianMoShi.frame = imageView.frame;
        [imageView addSubview:yeJianMoShi];
        [yeJianMoShi release];
        yeJianMoShi.backgroundColor = [UIColor blackColor];
        yeJianMoShi.alpha = 0.5;
        
    }
    
}

- (void)fanHui:(UIButton *)button {
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
